% File:     uc-save-simulation-data.tex
% Author:   Ryan J. Bovorasmy
% Date:     2007-06-24
% Desc:     This template is used to add a use case to the srs.tex template.
% Rev:      [2007-06-24, Ryan J. Bovorasmy] First major revision.
% Rev:      [2007-10-17, Ryan J. Bovorasmy] Created use case from template.
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% INSTRUCTIONS:
%%
%% This document can be used to create a use case for use with the srs.tex
%% template.
%%
%% Certain sections (such as this one) are delimited with special comments.
%% These sections contain similar material, and should be treated as a group.
%%
%% Comments beginning with *** indicate that editing is necessary in that
%% area. Example:
%%
%% *** Section description. This section needs editing.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
%
% BEGIN COMMAND SECTION
% Do Not edit this section unless you know what you are doing.
%
\providecommand{\usecase}{~}
\providecommand{\usehistory}{~}
\providecommand{\uc}{UC\theusecase}
\providecommand{\actor}{~}
\providecommand{\system}{~}
\setcounter{flownumber}{0}
\providecommand{\flowcounter}{\addtocounter{flownumber}{1} \theflownumber}
%
% END COMMAND SECTION
%
%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

%==============================================================================
%
% BEGIN VARIABLE SECTION
%
% *** Enter the name of the use case here:
%
\renewcommand{\usecase}{User Saves Simulation Data}
%
% *** Enter the revision history here.
% The format of the history command is as follows:
%
% \history{NAME}{DATE}{BRIEF DESCRIPTION\\}
%
% Notice that a newline is REQUIRED after the description.
%
\renewcommand{\usehistory}%
{%
  \history{Ryan J. Bovorasmy}{2007-10-17}{First major revision.\\}
}
%
% END VARIABLE SECTION
%
%==============================================================================
\addtocounter{usecase}{1}
\subsection{\uc{}: \usecase{}}

%------------------------------------------------------------------------------
% Do not edit this.
%
\paragraph{\uc{}: Revision History}~\\{}
\begin{table}[htbp]
  \begin{tabular}{|l|l|p{.4\textwidth}|}
    \usehistory
    \hline
  \end{tabular}
\end{table}

%------------------------------------------------------------------------------
% *** Enter a brief description.
%
\paragraph{\uc{}: Brief Description}
The user saves all simulation data. See \emph{Additional Notes} for a complete description of \emph{simulation data}.

% %------------------------------------------------------------------------------
% % *** Image/model
% %
% % Uncomment this section if you would like to add an image of the use case
% % here.
% %
% \paragraph{\uc{}: Model}
% If graphics are being used, add an image of the use case here.

%------------------------------------------------------------------------------
% ** Create a list of actors.
%
\paragraph{\uc{}: Actors}
\begin{description}
  \item[User] The user of the \projectname{} software.
  \item[\projectname{}] The \projectname{} software.
\end{description}

%------------------------------------------------------------------------------
% *** Pre-conditions.
%
\paragraph{\uc{}: Pre-Conditions}
\begin{description}
  \item[Environment Setup] An environment has been set up.
\end{description}

%------------------------------------------------------------------------------
% *** Basic flow.
%
% First enter in the actor name and system name.
%
\renewcommand{\actor}{User}
\renewcommand{\system}{\projectname{}}
\paragraph{\uc{}: Basic Flow}~\\{}~\\{}
\begin{tabular}{|c|p{.4\textwidth}|p{.4\textwidth}|}
  \hline
  \# & \actor{} & \system{} \\
  \hline
  %
  % *** Next, create the rows of the table.
  % Because only one person can be acting at a time, each row should contain
  % one space. Replace the other space with the action.
  %
  \flowcounter{} & The user indicates that they wish to save simulation data. & ~ \\
  \hline
  \flowcounter{} & ~ & The systems asks the user for a file location. \\
  \hline
  \flowcounter{} & The user selects a file location. & ~ \\
  \hline
  \flowcounter{} & ~ & The system prepares the simulation data. \\
  \hline
  \flowcounter{} & ~ & The system creates a file at the selected location containing the prepared simulation data. \\
  \hline
\end{tabular}


%------------------------------------------------------------------------------
% *** Alternative flow.
%
\paragraph{\uc{}: Alternative Flows}
\begin{description}
  \item[File Exists] If the selected file already exists, the user will be prompted to either overwrite the file, or cancel the save.
  \item[User Cancels] The user may cancel rather than select a file location. When this occurs, the system shall revert to the sate it was in before the save was initiated.
\end{description}

%------------------------------------------------------------------------------
% *** Exception flow.
%
\paragraph{\uc{}: Exception Flows}
\begin{description}
  \item[File Unwritable] If the selected file is unable to be written to, the system shall revert to the sate it was in before the save was initiated.
  \item[Simulation Data Error] the system shall revert to the sate it was in before the save was initiated, and the simulation data will not be saved.
\end{description}

%------------------------------------------------------------------------------
% *** Post-conditions.
%
\paragraph{\uc{}: Post-Conditions}
\begin{description}
  \item[Data Saved] The formatted simulation data will be stored in the selected file.
\end{description}

%------------------------------------------------------------------------------
% *** Enter any additional notes here.
%
\paragraph{\uc{}: Additional Notes}
Simulation data, as used in this use case, refers to the following information:\\

\textbf{Standard Data:} Information about the environment setup and information about the initial organisms in the environment. \textbf{Potential Data:} Information about the results of the simulation.
	
Information about the results of the simulation can only be saved if the simulation is complete, but information about the environment and organisms will always be saved.
